package com.seabook.store.goodmgr.domain;

import java.io.Serializable;
import java.util.List;

/**
 * 
 * @project HettyStore
 * @author Tan Hao
 * @lastUpdate 2010-6-15
 */
public class Category implements Serializable, Comparable<Category>{
    
    private static final long serialVersionUID = 7479708611893738525L;

    private int id;
    
    private int categoryId;
    
    private int order;

    private String name;

    private String status = "collapse";

    private Category parentCategory;
    
    private List<Category> childrenCategories;

 
    public int compareTo(Category o) {
        // TODO Auto-generated method stub
        return this.order - o.getOrder();
    }


    public int getId() {
        return id;
    }


    public void setId(int id) {
        this.id = id;
    }


    public int getOrder() {
        return order;
    }


    public void setOrder(int order) {
        this.order = order;
    }


    public String getName() {
        return name;
    }


    public void setName(String name) {
        this.name = name;
    }


    public String getStatus() {
        return status;
    }


    public void setStatus(String status) {
        this.status = status;
    }


    public Category getParentCategory() {
        return parentCategory;
    }


    public void setParentCategory(Category parentCategory) {
        this.parentCategory = parentCategory;
    }


    public List<Category> getChildrenCategories() {
        return childrenCategories;
    }


    public void setChildrenCategories(List<Category> childrenCategories) {
        this.childrenCategories = childrenCategories;
    }


    public int getCategoryId() {
        return categoryId;
    }


    public void setCategoryId(int categoryId) {
        this.categoryId = categoryId;
    }

}
